import { defineUserConfig } from "vuepress";
import { registerComponentsPlugin } from "@vuepress/plugin-register-components";
import { getDirname, path } from "@vuepress/utils";
import theme from "./theme.js";

// @ts-ignore
const __dirname = getDirname(import.meta.url);

export default defineUserConfig({
  base: "/my-notes/",

  locales: {
    "/": {
      lang: "zh-CN",
      title: "KingWoodの学习笔记",
      description: "我的博客",
    },
  },

  theme,
  plugins: [
    // 注册全局组件的插件
    // @ts-ignore
    registerComponentsPlugin({
      componentsDir: path.resolve(__dirname, "./components"),
    }),
  ],

  shouldPrefetch: false,
});
